//将秒转化为时分秒
function formateSeconds(time) {
  time = Math.round(time)
  var min = Math.floor(time % 3600);
  let result = '00:00'
  let h = Math.floor(time / 3600)
  if (h < 10) { h = '0' + h }
  let m = Math.floor(min / 60)
  if (m < 10) { m = '0' + m }
  let s = time % 60
  if (s < 10) { s = '0' + s }
  if(h==0){
    result = m + ':' + s
  }else{
    result = Math.floor(time / 3600) + ':' + Math.floor(min / 60) + ':' + time % 60;
  }
  return result
}



export { formateSeconds }